Skip to content

Conversation

@alextoudic
Copy link

Fixes the TypeError: Cannot read property 'Base64' of undefined error on Expo SDK 54, caused by expo-file-system/next becoming the default export and the old API moving to expo-file-system/legacy (see #3583).

This update adds a conditional import that uses expo-file-system/legacy when available (Expo SDK 54) and falls back to the default import otherwise. This keeps the polyfill working across both older and newer Expo releases.

Note:
It uses a try / catch approach as requiring expo-file-system/legacy on former versions of Expo will raise a Unable to resolve "expo-file-system/legacy" from "node_modules/@react-three/fiber/native/dist/react-three-fiber-native.cjs.prod.js" error

@alextoudic alextoudic changed the title fix(polyfills): conditionally import expo-file-system/legacy to suppo… Fix Expo SDK 54 compatibility through workaround Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant